Forked from: https://people.torproject.org/~dcf/graphs/ooni-coverage-20170428

Graphs of the time and country coverage of OONI reports, derived from
the OONI Measurement API's index of reports.


== Howto

Rscript graphs.R # leaves graphs in Rplots.pdf


== Data sources

ooni-index-20170414.json.xz
	JSON index of reports from the OONI Measurements API.
	wget -O ooni-index-20170414.json 'https://api.ooni.torproject.org/api/v1/files?limit=500000'
	xz -v ooni-index-20170414.json

ooni-index.csv.xz
	ooni-index-20170414.json.xz converted to CSV.
	xz -dc ooni-index-20170414.json.xz | ./json2csv | xz -v > ooni-index.csv.xz

country-codes.csv
	Maps ISO-3166 2-letter codes to country name and continent.
	More information: http://data.okfn.org/data/core/country-codes.
	wget http://data.okfn.org/data/core/country-codes/r/country-codes.csv

2016_Statistical_Annex_Table_1.xls
	Spreadsheet mapping country name to Human Development Index
	among other things. More information:
		https://en.wikipedia.org/wiki/Human_Development_Index
		https://en.wikipedia.org/wiki/List_of_countries_by_Human_Development_Index
		http://hdr.undp.org/en/composite/HDI
	wget http://hdr.undp.org/sites/default/files/composite_tables/2016_Statistical_Annex_Table_1.xls

hdi.csv
	CSV of Human Development Index extracted from
	2016_Statistical_Annex_Table_1.xls. Made by copying and pasting
	followed by manual editing to remove blank lines and headers.

run.sh
	Produce graphs based on the specified tests (vanilla_tor, tcp_connect, meek_fronted_requests_test)

== Requirements

R version > 3.3.3 with the ggplot2 package
	Debian requirements installation: apt install r-base r-cran-ggplot2
